<template>
  <div style="width: 1000px;margin: auto;">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <h1>{{ item.title }}</h1>
      </div>
      <div v-for="v in item.children" :key="v.id" class="text item">
        <p style="display: flex;justify-content: space-between;">
          <span>第{{ v.type}}单元</span>
          <span>{{ v.datetime }}</span>
        </p>
      </div>
    </el-card>
  </div>
</template>

<script>
import axios from "axios";
export default {
  created() {
    axios
      .post("/api/detail", {
        id: this.$route.params.id
      })
      .then(resp => {
        console.log(resp.data);
        this.item = resp.data.data;
      });
  },
  data() {
    return {
      item: {}
    };
  }
};
</script>